package io.renren.modules.user.controller;

import io.renren.common.utils.Result;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
public class StudentController {

//    @RequestMapping(value ="/save",method = RequestMethod.POST)
    @PostMapping("/student") // 请求地址，请求方式
    public Result save(@RequestBody Map<String, Object> student) {
        return new Result().ok(null);
    }

    @PutMapping("/student") // 请求地址，请求方式
    public Result update(@RequestBody Map<String, Object> student) {
        return new Result().ok(null);
    }

    @GetMapping("/student/{id}") // 请求地址，请求方式
    public Result info(@PathVariable Integer id) { // ?id=10
        return new Result().ok(id);
    }

    @DeleteMapping("/student/{id}") // 请求地址，请求方式

    public Result remove(@PathVariable Integer id) { // ?id=10
        return new Result().ok(id);
    }
}
